package com.yhn.bubblevideo.user.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yhn.bubblevideo.model.domain.UserMoments;
import com.yhn.bubblevideo.model.dto.req.user.moment.UserMomentAddRequestDTO;
import com.yhn.bubblevideo.user.mapper.UserMomentsMapper;
import com.yhn.bubblevideo.user.service.UserMomentsService;
import org.springframework.stereotype.Service;

/**
 * @author 86177
 * @description 针对表【user_moments】的数据库操作Service实现
 * @createDate 2024-12-17 13:28:52
 */
@Service
public class UserMomentsServiceImpl extends ServiceImpl<UserMomentsMapper, UserMoments>
        implements UserMomentsService {

    @Override
    public void addUserMoments(UserMomentAddRequestDTO requestParam) {
        UserMoments userMoments = new UserMoments();
        BeanUtil.copyProperties(requestParam, userMoments);
        //向数据插入数据
        this.save(userMoments);
        //TODO 向MQ发送消息

    }
}




